package com.neuedu.user.service;

import com.neuedu.mapper.UserMapper;
import com.neuedu.po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper dao;
    @Override
    public List<User> selectAll(User u) {
        return dao.selectAll(u);
    }

    @Override
    public User selectById(User u) {
        return dao.selectById(u);
    }

    @Override
    public int add(User u) {
        return dao.add(u);
    }

    @Override
    public int update(User u) {
        return dao.update(u);
    }

    @Override
    public int delete(User u) {
        return dao.delete(u);
    }

    @Override
    public User login(User u) {
        return dao.selectByUnameByPass(u);
    }
}
